<?

class Menu {

      private $url;
      function __construct() {
      
               $server = $_SERVER['SERVER_NAME'];
               $endereco = $_SERVER ['REQUEST_URI'];
               $this->url = "http://" . $server . $endereco;
               
               ?>
               <div id="menu">
               <ul>
                   <li> 1 </li>
                   <li> 2 </li>
                   <li> 3 </li>

               <?
      }
      
      public function __destruct() {
               ?>
               <li> <a href="./logout.php?url=<?=$this->url?>">logout</a> </li>
               </ul>
               </div>
               <?
      }

}

class MenuAdm extends Menu{
      function __construct() {
               parent::__construct();
               
               ?>
               <li> 4 adm </li>
               <li> 5 adm </li>
               <?
      }
      
      function __destruct() {
               parent::__destruct();
      }

}

class MenuLoc extends Menu{
      function __construct() {
               parent::__construct();
               ?>
               <li> 4 locadora </li>
               <li> 5 locadora </li>
               <?
      }

      function __destruct() {
               parent::__destruct();
      }

}

class MenuUsuario extends Menu{
      function __construct() {
               parent::__construct();
               ?>
               <li> 4 usuario </li>
               <li> 5 usuario </li>
               <?
      }

      function __destruct() {
               parent::__destruct();
      }

}

?>
